<div class="row">
  <div class="col-sm-12">
      <table class="table">
        <h3>我的博客列表</h3>
        <tbody>
          <% if current_user %>
            <% @articles.each do |article| %>
                <% if current_user.id == article.user_id %>
                  <tr>
                    <td><%= link_to article.title, article_path(article) %></td>
                    <td><%= link_to '编辑', edit_article_path(article) %></td>
                    <td><%= link_to '删除', article_path(article), method: :delete %></td>
                    <td><%= article.created_at.to_s(:db) %></td>
                  </tr>
              <% end %>
            <% end %>
          <% else %>
            <h3>用户尚未登录，请先登录</h3>
          <% end %>
        </tbody>
      </table>




  </div>
</div>